package com.chinawlx.wlxteacher.widget.calendar;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;

/**
 * 作者:吴名
 * 时间:16/9/3
 * 描述:完全展示所有child高度
 */
public class WrapContentHeightGridView extends GridView {
    public WrapContentHeightGridView(Context context) {
        super(context);
    }

    public WrapContentHeightGridView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public WrapContentHeightGridView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}
